/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	         </p>
 * <p>创建者   :	hy 
 * 
 * <p>描   述  :   DevelopTarget.java for com.pengtu.gsj.entity.jhgl    </p>
 * 
 * <p>最后修改 : $: 2017年6月28日-下午6:09:10 v 1.0.0	 win7   $ </p>
 * 
*/

package com.pengtu.gsj.entity.jhgl;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 
 * DevelopTarget
 * 
 * 2017年6月28日 下午6:09:10
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_JH_DEVELOPTARGET")
public class DevelopTarget extends IdEntity {

	
	private static final long serialVersionUID = -9201730997617511717L;
	
	private String year;			//年份
	private Double pqiAverage;		//PQI平均值
	private Double pqiPate;			//PQI不大于70的比例
	private String remark;			//备注
	
	//用于导出是使用
	private double averageMark;		//平均值检查扣分
	private double pateMark;		//比重扣分
	private double yearMark;		//年度得分
	
	private Integer bulletinNumber;   //检测文件数
	private List<Attachment> attachments;
	
	@Column(name = "YEAR")
	public String getYear() {
		return year;
	}
	public void setYear(String year) {
		this.year = year;
	}
	@Column(name = "PQIAVERAGE")
	public Double getPqiAverage() {
		return pqiAverage;
	}
	public void setPqiAverage(Double pqiAverage) {
		this.pqiAverage = pqiAverage;
	}
	@Column(name = "PQIPATE")
	public Double getPqiPate() {
		return pqiPate;
	}
	public void setPqiPate(Double pqiPate) {
		this.pqiPate = pqiPate;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	
	
	@Transient
	public double getAverageMark() {
		return averageMark;
	}
	public void setAverageMark(double averageMark) {
		this.averageMark = averageMark;
	}
	
	@Transient
	public double getYearMark() {
		return yearMark;
	}
	public void setYearMark(double yearMark) {
		this.yearMark = yearMark;
	}
	
	@Transient
	public double getPateMark() {
		return pateMark;
	}
	public void setPateMark(double pateMark) {
		this.pateMark = pateMark;
	}
}
